package cn.pacerx.running.db.domain;

import cn.pacerx.running.db.enums.UserActivityStatusEnum;
import cn.pacerx.running.db.typehandler.EnumOrdinalCustomizerTypeHandler;
import io.mybatis.provider.Entity;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@Entity.Table("user_activity")
public class UserActivity {
    @Entity.Column(id = true, useGeneratedKeys = true, insertable = false, updatable = false)
    private Long id;

    private Long userId;

    private String nickname;

    private String avatar;

    private Long activityId;

    private Long activityUserId;

    private String remark;

    @Entity.Column(typeHandler = EnumOrdinalCustomizerTypeHandler.class)
    private UserActivityStatusEnum status;

    @Entity.Column(updatable = false, insertable = false)
    private LocalDateTime addTime;

    @Entity.Column(updatable = false, insertable = false)
    private LocalDateTime updateTime;
}
